package org.huzhp.audit.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @Description: 用户请求信息
 * @Author: huzp
 * @CreateDate: 2020/4/10 10:17
 * @Version: 1.0
 */
@Data
@TableName(value = "base_request_log")
public class RequestLog {

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.ID_WORKER)
    private Long id;

    @TableField(value = "log_route")
    private String logRoute;

    @TableField(value = "log_request_id")
    private String logRequestId;

    @TableField(value = "log_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date logTime;

    @TableField(value = "log_ip")
    private String logIp;

    @TableField(value = "log_system")
    private String logSystem;

    @TableField(value = "log_brower")
    private String logBrower;

    @TableField(value = "log_version")
    private String logVersion;

    @TableField(value = "log_mobile")
    private int logMobile;

    @TableField(value = "log_url")
    private String logUrl;

    @TableField(value = "log_method")
    private String logMethod;

    @TableField(value = "log_status")
    private String logStatus;

    @TableField(value = "log_message")
    private String logMessage;

    @TableField(value = "log_took")
    private int logTook;
}
